<a href='http://github.com/angular/angular.js/edit/master/src/Angular.js' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this doc</a>



<a href='http://github.com/angular/angular.js/tree/master/src/Angular.js#L1269' class='view-source pull-right btn btn-primary'>
  <i class="glyphicon glyphicon-zoom-in">&nbsp;</i>View Source
</a>


<header class="api-profile-header">
  <h1 class="api-profile-header-heading">angular.bootstrap</h1>
  <ol class="api-profile-header-structure naked-list step-list">
    
    <li>
      - function in module <a href="api/ng">ng</a>
    </li>
  </ol>
</header>



<div class="api-profile-description">
  <p>Use this function to manually start up angular application.</p>
<p>See: <a href="guide/bootstrap">Bootstrap</a></p>
<p>Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
They must use <a href="api/ng/directive/ngApp">ngApp</a>.</p>
<p>Angular will detect if it has been loaded into the browser more than once and only allow the
first loaded script to be bootstrapped and will report a warning to the browser console for
each of the subsequent scripts. This prevents strange results in applications, where otherwise
multiple instances of Angular try to work on the DOM.</p>
<p>

<div>
  <a ng-click="openPlunkr('examples/example-multi-bootstrap')" class="btn pull-right">
    <i class="glyphicon glyphicon-edit">&nbsp;</i>
    Edit in Plunker</a>
  <div class="runnable-example"
      path="examples/example-multi-bootstrap"
      name="multi-bootstrap"
      module="multi-bootstrap">

   
    <div class="runnable-example-file" 
      name="index.html"
      language="html"
      type="html">
      <pre><code>&lt;script src=&quot;../../../angular.js&quot;&gt;&lt;/script&gt;&#10;&lt;div ng-controller=&quot;BrokenTable&quot;&gt;&#10;  &lt;table&gt;&#10;  &lt;tr&gt;&#10;    &lt;th ng-repeat=&quot;heading in headings&quot;&gt;{{heading}}&lt;/th&gt;&#10;  &lt;/tr&gt;&#10;  &lt;tr ng-repeat=&quot;filling in fillings&quot;&gt;&#10;    &lt;td ng-repeat=&quot;fill in filling&quot;&gt;{{fill}}&lt;/td&gt;&#10;  &lt;/tr&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;</code></pre>
    </div>
  
    <div class="runnable-example-file" 
      name="controller.js"
      language="js"
      type="js">
      <pre><code>var app = angular.module(&#39;multi-bootstrap&#39;, [])&#10;&#10;.controller(&#39;BrokenTable&#39;, function($scope) {&#10;    $scope.headings = [&#39;One&#39;, &#39;Two&#39;, &#39;Three&#39;];&#10;    $scope.fillings = [[1, 2, 3], [&#39;A&#39;, &#39;B&#39;, &#39;C&#39;], [7, 8, 9]];&#10;});</code></pre>
    </div>
  
    <div class="runnable-example-file" 
      name="protractor.js"
      type="protractor"
      language="js">
      <pre><code>it(&#39;should only insert one table cell for each item in $scope.fillings&#39;, function() {&#10;expect(element.all(by.css(&#39;td&#39;)).count())&#10;    .toBe(9);&#10;});</code></pre>
    </div>
  

    <iframe class="runnable-example-frame" src="examples/example-multi-bootstrap/index.html" name="example-multi-bootstrap"></iframe>
  </div>
</div>

</p>

</div>




<div>
  

    

  <h2 id="usage">Usage</h2>
    
      <p><code>angular.bootstrap(element, [modules]);</code></p>


    

    
<section class="api-section">
  <h3>Arguments</h3>

<table class="variables-matrix input-arguments">
  <thead>
    <tr>
      <th>Param</th>
      <th>Type</th>
      <th>Details</th>
    </tr>
  </thead>
  <tbody>
    
    <tr>
      <td>
        element
        
        
      </td>
      <td>
        <a href="" class="label type-hint type-hint-domelement">DOMElement</a>
      </td>
      <td>
        <p>DOM element which is the root of angular application.</p>

        
      </td>
    </tr>
    
    <tr>
      <td>
        modules
        
        <div><em>(optional)</em></div>
      </td>
      <td>
        <a href="" class="label type-hint type-hint-array">Array&lt;String|Function|Array&gt;=</a>
      </td>
      <td>
        <p>an array of modules to load into the application.
    Each item in the array should be the name of a predefined module or a (DI annotated)
    function that will be invoked by the injector as a run block.
    See: <a href="api/ng/function/angular.module">modules</a></p>

        
      </td>
    </tr>
    
  </tbody>
</table>

</section>
    
    <h3>Returns</h3>
<table class="variables-matrix return-arguments">
  <tr>
    <td><a href="" class="label type-hint type-hint-auto">auto.$injector</a></td>
    <td><p>Returns the newly created injector for this app.</p>
</td>
  </tr>
</table>

  
  
  



  
</div>


